<?php

namespace app\index\controller;

use think\Controller;
use think\Request;
use think\Session;
use think\Db;

class IndexBase extends Controller
{
    // 前台基类
    public function _initialize()
    {
        // 存session获取html样式标准
        $name = Session::get('index.name');
        $nickname = Session::get('index.nickname');
        $id = Session::get('index.id');
        $list['name'] = $name;
        $list['nickname'] = $nickname;
        $list['id'] = $id;
        $this->assign('list' , $list);
    }

    public function delIndex(){
        // 删除session页面不显示登录样式
        Session::delete('index');

        return $this->redirect('index/index/index');
    }

}
